package es.twentymobile.mule.modules.jpa.strategy;

import javax.persistence.EntityManager;

public abstract class AbstractEntityManagerStrategy implements EntityManagerStrategy {

	protected EntityManager em;
	
	protected Boolean flush;

	public EntityManager getEntityManager() {
		return em;
	}

	public void lease() {
		if (em != null && em.isOpen()) {
			em.close();
			em = null;
		}
	}

}
